package recite.word.service.base.util.date;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormat {

    public static String format(Date date){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(date);
    }

    public static String format2month(Date date) {
        String format = format(date);
        return format.substring(0,7);
    }
}
